home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 03 - 1987 / 03.09 Sep 87 / fortran source / misc stuff / prport folder / prport.inc < prev    next >
Encoding:
Text File  |  1986-01-20  |  2.8 KB  |  93 lines  |  [TEXT/EDIT]

  1. * This include file defines a set of bit masks used
  2. * to control PRPORT.SUB, which allows the printer
  3. * to be opened as a grafport from FORTRAN.  
  4. * The operation of these functions and procedures is documented
  5. * in Apple's Inside Macintosh Printer Manager Manual.
  6. * The bit masks are defined as follows:
  7. *
  8. *    bit 31 : Type bit.
  9. *        1 - Special function.  The remainder of
  10. *            the longword specifies an arbitrary
  11. *            routine number in this case.
  12. *        0 - Print manager function.  These functions
  13. *            read in PDEF code segments from a print
  14. *            manager file and jump to routines in them.
  15. *            The rest of the longword contains information
  16. *            on which PDEF resource to read in, the offset
  17. *            to jump to, and how to format the FORTRAN variables
  18. *            passed for use by the PDEF code.  These fields are
  19. *            listed below.
  20. *    bits 24-30 : Resource ID number of PDEF resource to read.
  21. *    bits 16-23 : Number of arguments (all 4 byte integers) passed.
  22. *    bit 15 : Unlock the PDEF resource in memory if set.
  23. *    bits 8-14 : Type of function return:
  24. *            0 - No return value (procedure).
  25. *            1 - Word returned.
  26. *            2 - Longword returned.
  27. *            3 - Boolean word returned.
  28. *    bits 0-7 : Offset into the PDEF code to jump to.
  29. *
  30. * 15 Nov 85                            EWG
  31. * 20 Jan 86    Sent to Compuserve.                EWG
  32.  
  33. * PROCEDURE PrOpen; 
  34.     INTEGER PROPEN
  35.     PARAMETER (PROPEN=Z'80000000')
  36.  
  37. * PROCEDURE PrClose; 
  38.     INTEGER PRCLOSE
  39.     PARAMETER (PRCLOSE=Z'80000001')
  40.  
  41. * PROCEDURE PrintDefalut (hPrint: THPrint);
  42.     INTEGER PRINTDEFAULT
  43.     PARAMETER (PRINTDEFAULT=Z'04018000')
  44.  
  45. * FUNCTION PrValidate (hPrint: THPrint) : BOOLEAN;
  46.     INTEGER PRVALIDATE
  47.     PARAMETER (PRVALIDATE=Z'04018318')
  48.  
  49. * FUNCTION PrStlDialog (hPrint: THPrint) : BOOLEAN;
  50.     INTEGER PRSTLDIALOG
  51.     PARAMETER (PRSTLDIALOG=Z'04018304')
  52.  
  53. * FUNCTION PrJobDialog (hPrint: THPrint) : BOOLEAN;
  54.     INTEGER PRJOBDIALOG
  55.     PARAMETER (PRJOBDIALOG=Z'04018308')
  56.  
  57. * PROCEDURE PrJobMerge (hPrintSrc, hPrintDst: THPrint);
  58.     INTEGER PRJOBMERGE
  59.     PARAMETER (PRJOBMERGE=Z'0402801C')
  60.  
  61. * FUNCTION PrOpenDoc (hPrint: THPrint; pPrPort: TPPrPort;
  62. *            pIOBuf: Ptr) : TpPrPort;
  63.     INTEGER PROPENDOC
  64.     PARAMETER (PROPENDOC=Z'00030200')
  65.  
  66. * PROCEDURE PrOpenPage (pPrPort: TPPrPort; pPageFrame: TPRect);
  67.     INTEGER PROPENPAGE
  68.     PARAMETER (PROPENPAGE=Z'00020008')
  69.  
  70. * PROCEDURE PrClosePage (pPrPort: TPPrPort);
  71.     INTEGER PRCLOSEPAGE
  72.     PARAMETER (PRCLOSEPAGE=Z'0001000C')
  73.  
  74. * PROCEDURE PrCloseDoc (pPrPort: TPPrPort);
  75.     INTEGER PRCLOSEDOC
  76.     PARAMETER (PRCLOSEDOC=Z'00018004')
  77.  
  78. * Note: prStatus should actually be passed as a pointer to a TPrStatus
  79. *    record.
  80. * PROCEDURE PrPicFile (hPrint: THPrint; pPrPort: TPPrPort; pIOBuf: Ptr;
  81. *            pDevBuf: Ptr; VAR prStatus: TPrStatus);
  82.     INTEGER PRPICFILE
  83.     PARAMETER (PRPICFILE=Z'05058000')
  84.  
  85. * FUNCTION PrError : INTEGER;
  86.     INTEGER PRERROR
  87.     PARAMETER (PRERROR=Z'80000002')
  88.  
  89. * PROCEDURE PrSetError(iErr : INTEGER);
  90.     INTEGER PRSETERROR
  91.     PARAMETER (PRSETERROR=Z'80000003')
  92.  
  93.